﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_CauHoi_ThemCauHoi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loaddulieu();
        }
    }

    private void loaddulieu()
    {
        List<LoaiCauHoiINFO> dsloaicauhoi = LoaiCauHoiDAL.listAll();
        ddlloaicauhoi.DataSource = dsloaicauhoi;
        ddlloaicauhoi.DataTextField = "TenLoai";
        ddlloaicauhoi.DataValueField = "MaLoai";
        ddlloaicauhoi.DataBind();
        List<MonThiINFO> dsmonthi = MonThiDAL.listAll();
        ddlmonthi.DataSource = dsmonthi;
        ddlmonthi.DataTextField = "TenMon";
        ddlmonthi.DataValueField = "MaMon";
        DataBind();
        List<DoKhoINFO> dsdokho = DoKhoDAL.listAll();
        ddldokho.DataSource = dsdokho;
        ddldokho.DataTextField = "DoKho";
        ddldokho.DataValueField = "MaDoKho";
        DataBind();
 
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        
    }
}